<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        //前置递增运算符
        var num = 1;
        ++num;
        console.log(num);
        //后置递增运算符
        num++;
        console.log(num);
        console.log(num++ +10);
        console.log(num);

        //逻辑中断
        //有多个表达式时，左边的表达式可以运算，则不算右边的
        
        //逻辑与 若第一个为真，则返回表达式2
        //       若第一个为假，则返回表达式1
        console.log(123&&456);
        console.log(0&&456);
        console.log(0&&1+2&&456+789&&123);
        //假的有 NaN  ''  0  null  undefined
        
        //逻辑或 1为真返回1 1为假返回2
        console.log(123||456);
        console.log(0||456);
        
        
    </script>
</head>
<body>
    
</body>
</html>